#ifndef TCP_SERVER_SESSION_H
#define TCP_SERVER_SESSION_H

#include "Common.h"
#include "type.h"

class TcpServerSession
{
public:
	int srv_start();
//	int srv_shutdown();
	int srv_close();

	virtual void execute_srv_protocol(int* conn_sock) = 0;

protected:
	TcpServerSession(string local_addr, uint16_t local_port);
	virtual ~TcpServerSession();

protected:
	in_addr_t m_local_addr;
	in_addr_t m_local_port;
	struct sockaddr_in m_local_struct_addr;

	int m_listen_sock;

	TcpSessionState m_tcp_state;
};

#endif
